<?php

/*
|--------------------------------------------------------------------------
| API Routes
|--------------------------------------------------------------------------
|
| Here is where you can register API routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| is assigned the "api" middleware group. Enjoy building your API!
|
 */

Route::post('login', 'Admin\UserController@login');
Route::post('register', 'Admin\UserController@register');

Route::group(['middleware' => 'auth:api'], function () {
    Route::get('SelfPage/{user}', 'Admin\UserController@SelfPage');
    Route::post('AdminUpdate', 'Admin\UserController@Update');

    Route::post('NewsDelete', 'Data\NewsController@NewsDelete')->name('NewsDelete');
    Route::post('NewsUpdate', 'Data\NewsController@NewsUpdate')->name('NewsUpdate');
    Route::post('NewsInsert', 'Data\NewsController@NewsInsert')->name('NewsInsert');

    Route::post('ProductDelete', 'Data\ProductController@ProductDelete')->name('ProductDelete');
    Route::post('ProductUpdate', 'Data\ProductController@ProductUpdate')->name('ProductUpdate');
    Route::post('ProductInsert', 'Data\ProductController@ProductInsert')->name('ProductInsert');

    Route::post('HonourDelete', 'Data\HonourController@HonourDelete')->name('HonourDelete');
    Route::post('HonourUpdate', 'Data\HonourController@HonourUpdate')->name('HonourUpdate');
    Route::post('HonourInsert', 'Data\HonourController@HonourInsert')->name('HonourInsert');

    Route::post('UpdateContact', 'Data\ServeController@UpdateContact')->name('UpdateContact');
    Route::post('UpdateInformation', 'Data\ServeController@Up+dateInformation')->name('UpdateInformation');

    Route::post('ProductCoverImg', 'Img\ImgController@ProductCoverImg')->name('ProductCoverImg');
    Route::post('ProductImgs', 'Img\ImgController@ProductImgs')->name('ProductImgs');
    Route::post('ProductConModeImg', 'Img\ImgController@ProductConModeImg')->name('ProductConModeImg');
    Route::post('ProductDetailsImg', 'Img\ImgController@ProductDetailsImg')->name('ProductDetailsImg');
    Route::post('ProductVideo', 'Img\VideoController@ProductVideo')->name('ProductVideo');

    Route::post('HonourCoverImg', 'Img\ImgController@HonourCoverImg')->name('HonourCoverImg');
    Route::post('NewsCoverImg', 'Img\ImgController@NewsCoverImg')->name('NewsCoverImg');

    Route::post('NewsContentImgInsert', 'Img\ImgController@NewsContentImgInsert')->name('NewsContentImgInsert');
    Route::post('NewsContentImgUpdate', 'Img\ImgController@NewsContentImgUpdate')->name('NewsContentImgUpdate');

    Route::post('TDCode', 'Data\ServeController@TDCode')->name('TDCode');
    Route::get('TmpClear', 'Data\ServeController@TmpClear')->name('TmpClear');
});
Route::post('VarCodeSend', 'Email\EmailController@VarCodeSend')->name('VarCodeSend');
Route::post('EmailSend', 'Email\EmailController@EmailSend')->name('EmailSend');

Route::get('News', 'Data\NewsController@SampleNews')->name('SampleNews');
Route::get('News/NewsCategorie', 'Data\NewsController@NewsCategorie')->name('NewsCategorie');
Route::get('News/NextNewsInCategorie', 'Data\NewsController@NextNewsInCategorie')->name('NextNewsInCategorie');
Route::get('News/NextNews', 'Data\NewsController@NextNews')->name('NextNews');
Route::get('News/{news}', 'Data\NewsController@CompleteNews')->name('CompleteNews');

Route::get('Product', 'Data\ProductController@SampleProduct')->name('SampleProduct');
Route::get('Product/ProductCategorie', 'Data\ProductController@ProductCategorie')->name('ProductCategorie');
Route::get('Product/NextProductInCategorie', 'Data\ProductController@NextProductInCategorie')->name('NextProductInCategorie');
Route::get('Product/NextProduct', 'Data\ProductController@NextProduct')->name('NextProduct');
Route::get('Product/{product}', 'Data\ProductController@CompleteProduct')->name('CompleteProduct');

Route::get('Honour', 'Data\HonourController@SampleHonour')->name('SampleHonour');
Route::get('Honour/{honour}', 'Data\HonourController@CompleteHonour')->name('CompleteHonour');
Route::get('Honour/NextHonour', 'Data\HonourController@NextHonour')->name('NextHonour');

Route::get('Contact', 'Data\ServeController@ReadContact')->name('ReadContact');
Route::get('Imformation', 'Data\ServeController@ReadInformation')->name('ReadInformation');
Route::get('AllData', 'Data\AllDataController@AllData')->name('AllData');
